System.Collections.IDictionary.Add Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Adds a key-value pair to the collection. If key or value are not of the expected types, an ArgumentException is thrown. If both key and value are of the expected types, the (overridden) Add method is called with the key and value to add.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
private void IDictionary.Add(
	Object key,
	Object value
)
Visual Basic (Declaration)
Private Sub System.Collections.IDictionary.Add ( _
	key As Object, _
	value As Object _
) Implements IDictionary.Add
Visual C++
private:
virtual void System.Collections.IDictionary.Add (
	Object^ key, 
	Object^ value
) sealed = IDictionary::Add

Parameters

key
Object
Key to add to the dictionary.
value
Object
Value to add to the dictionary.

Exceptions

ExceptionCondition
System..::ArgumentExceptionkey or value are not of the expected type for this dictionary.

See Also